Skip to content

feat(www): add rss and atom feeds#4495

Open
AnInternetTroll wants to merge 1 commit intodigdir:mainfrom
AnInternetTroll:user/luca/rss
Open

feat(www): add rss and atom feeds#4495
AnInternetTroll wants to merge 1 commit intodigdir:mainfrom
AnInternetTroll:user/luca/rss

Conversation

@AnInternetTroll
Copy link
Contributor

@AnInternetTroll AnInternetTroll commented Feb 11, 2026

resolves #4492

Summary

Generate RSS and Atom feeds at build time for the blog on the main designsystemet.no website for all available languages. Strongly inspired by how sitemap.xml is generated, as well as many helper functions copied all over github and stackoverflow

In addition these feeds have been checked with https://validator.w3.org/feed/ and should be valid

Lastly, I couldn't get react router to build when using path aliases, so some stuff had to be changed to be relative links unfortunately

Checks

@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2026

⚠️ No Changeset found

Latest commit: df97a30

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mimarz
Copy link
Collaborator

mimarz commented Feb 12, 2026

Cool! @Barsnes is busy today, but I think its best he has a look at this since he's our react router expert :D

In the meantime could you please fix the formating/sort errors? :)

Comment on lines 14 to 28
const dayStrings = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
const monthStrings = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec',
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip! I used Intl.DateTimeFormat to get the day/month name, but still keeping the whole file for the RFC-882-ness of it all :P

@@ -1,4 +1,4 @@
import en from '@internal/components/src/_locales/en';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for changing this?
We have @internal/components installed as a package in www

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Reverted the change

Comment on lines +2 to +4
import i18n from './i18n';
import en from './locales/en';
import no from './locales/no';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for changing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build process doesn't like it when these use path aliases

It's also why I changed @internal/components, but that's actually not a path alias and works as expected. So I'll revert that

$ pnpm build:www

> root@0.0.0 build:www /home/luca/git_clones/designsystemet
> pnpm --filter @web/www build


> @web/www@ build /home/luca/git_clones/designsystemet/apps/www
> react-router typegen && react-router build

Error: Error loading /home/luca/git_clones/designsystemet/apps/www/react-router.config.ts: Error: Cannot find module '~/i18n' imported from '/home/luca/git_clones/designsystemet/apps/www/app/i18next.server.ts'
    at createConfigLoader (/home/luca/git_clones/designsystemet/node_modules/.pnpm/@react-router+dev@7.13.0_@types+node@24.10.9_jiti@2.4.2_less@4.3.0_lightningcss@1.30.1__da506b19369c0bc5234f64cfdd1fd83c/node_modules/@react-router/dev/dist/vite.js:625:11)
    at BasicMinimalPluginContext.config (/home/luca/git_clones/designsystemet/node_modules/.pnpm/@react-router+dev@7.13.0_@types+node@24.10.9_jiti@2.4.2_less@4.3.0_lightningcss@1.30.1__da506b19369c0bc5234f64cfdd1fd83c/node_modules/@react-router/dev/dist/vite.js:3236:35)
    at runConfigHook (file:///home/luca/git_clones/designsystemet/node_modules/.pnpm/vite@7.3.1_@types+node@24.10.9_jiti@2.4.2_less@4.3.0_lightningcss@1.30.1_sass@1.87.0_st_96f85193d5e7f20965a220e556791264/node_modules/vite/dist/node/chunks/config.js:35936:15)
    at Module.resolveConfig (file:///home/luca/git_clones/designsystemet/node_modules/.pnpm/vite@7.3.1_@types+node@24.10.9_jiti@2.4.2_less@4.3.0_lightningcss@1.30.1_sass@1.87.0_st_96f85193d5e7f20965a220e556791264/node_modules/vite/dist/node/chunks/config.js:35438:13)
    at hasReactRouterRscPlugin (/home/luca/git_clones/designsystemet/node_modules/.pnpm/@react-router+dev@7.13.0_@types+node@24.10.9_jiti@2.4.2_less@4.3.0_lightningcss@1.30.1__da506b19369c0bc5234f64cfdd1fd83c/node_modules/@react-router/dev/dist/cli/index.js:1355:22)
    at typegen (/home/luca/git_clones/designsystemet/node_modules/.pnpm/@react-router+dev@7.13.0_@types+node@24.10.9_jiti@2.4.2_less@4.3.0_lightningcss@1.30.1__da506b19369c0bc5234f64cfdd1fd83c/node_modules/@react-router/dev/dist/cli/index.js:2392:15)
    at run2 (/home/luca/git_clones/designsystemet/node_modules/.pnpm/@react-router+dev@7.13.0_@types+node@24.10.9_jiti@2.4.2_less@4.3.0_lightningcss@1.30.1__da506b19369c0bc5234f64cfdd1fd83c/node_modules/@react-router/dev/dist/cli/index.js:2575:7)
/home/luca/git_clones/designsystemet/apps/www:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @web/www@ build: `react-router typegen && react-router build`
Exit status 1ELIFECYCLECommand failed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RSS for bloggen

3 participants